home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / bob_espo.swf / scripts / __Packages / PopUp.as < prev    next >
Encoding:
Text File  |  2013-04-24  |  1.3 KB  |  67 lines

  1. class PopUp extends State
  2. {
  3.    var sState;
  4.    static var sSTATE_IDLE = "Idle";
  5.    static var sSTATE_OPENING = "Opening";
  6.    static var sSTATE_OPENED = "Opened";
  7.    static var sSTATE_CLOSING = "Closing";
  8.    function PopUp(_mcRef)
  9.    {
  10.       super(_mcRef,false);
  11.       this.setState(PopUp.sSTATE_IDLE);
  12.    }
  13.    function doShow()
  14.    {
  15.       if(this.sState == PopUp.sSTATE_IDLE)
  16.       {
  17.          this.setState(PopUp.sSTATE_OPENING);
  18.       }
  19.    }
  20.    function doInstantShow()
  21.    {
  22.       if(this.sState == PopUp.sSTATE_IDLE)
  23.       {
  24.          this.setState(PopUp.sSTATE_OPENED);
  25.          this.initPopUp();
  26.       }
  27.    }
  28.    function doHide()
  29.    {
  30.       if(this.sState == PopUp.sSTATE_OPENED)
  31.       {
  32.          this.setState(PopUp.sSTATE_CLOSING);
  33.       }
  34.    }
  35.    function doInstantHide()
  36.    {
  37.       if(this.sState == PopUp.sSTATE_OPENED)
  38.       {
  39.          this.setState(PopUp.sSTATE_IDLE);
  40.       }
  41.    }
  42.    function initPopUp()
  43.    {
  44.    }
  45.    function Idle()
  46.    {
  47.    }
  48.    function Opening()
  49.    {
  50.       if(this.stateFinished())
  51.       {
  52.          this.setState(PopUp.sSTATE_OPENED);
  53.          this.initPopUp();
  54.       }
  55.    }
  56.    function Opened()
  57.    {
  58.    }
  59.    function Closing()
  60.    {
  61.       if(this.stateFinished())
  62.       {
  63.          this.setState(PopUp.sSTATE_IDLE);
  64.       }
  65.    }
  66. }
  67.